#include "common.h"
#include "bpf_helpers.h"
#include "bpf_tracing.h"
struct {
  __uint(type, BPF_MAP_TYPE_ARRAY);
  __uint(max_entries, 1);
  __type(key, u32);
  __type(value, u64);
} func_count SEC(".maps");

const u32 zero = 0;

SEC("uprobe/func")
int BPF_UPROBE(uprobe_func) {
  u64 *val = bpf_map_lookup_elem(&func_count, &zero);
  if (val) {
    __sync_fetch_and_add(val, 1);
  }
  return 0;
}

char _license[] SEC("license") = "GPL";